package com.xframework.security.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.xframework.annotation.MappingColumn;
import com.xframework.annotation.MappingTable;
import com.xframework.model.BaseModel;

/**
 * 角色资源对应表.
 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@MappingTable(tableName = "SECURITY_ROLE_RESOURCE")
public class RoleResource extends BaseModel {
	/**
	 * 角色id.
	 */
	@MappingColumn(columnName = "ROLE_ID", columnPk = true)
	private String roleId;
	/**
	 * 角色表.
	 */
	@MappingTable(tableName = "SECURITY_ROLE")
	private Role role;
	/**
	 * 资源id.
	 */
	@MappingColumn(columnName = "RESOURCE_ID", columnPk = true)
	private String resourceId;
	/**
	 * 资源表.
	 */
	@MappingTable(tableName = "SECURITY_RESOURCE")
	private Resource resource;

	/**
	 * 资源排序.
	 */
	@MappingColumn(columnName = "RESOURCE_SEQ")
	private Integer resourceSeq;
	/**
	 * 创建时间.
	 */
	@MappingColumn(columnName = "ROLE_RESOURCE_CREATE_TIME")
	private String roleResourceCreateTime;

	public RoleResource() {
	}

	/**
	 * 获取资源id.
	 * 
	 * @return 资源id
	 */
	public String getResourceId() {
		return resourceId;
	}

	/**
	 * 获取资源排序.
	 * 
	 * @return 资源排序
	 */
	public Integer getResourceSeq() {
		return resourceSeq;
	}

	/**
	 * 获取角色id.
	 * 
	 * @return
	 */
	public String getRoleId() {
		return roleId;
	}

	/**
	 * 获取创建时间.
	 * 
	 * @return 创建时间
	 */
	public String getRoleResourceCreateTime() {
		return roleResourceCreateTime;
	}

	/**
	 * 获取角色表.
	 * 
	 * @return 角色表
	 */
	public Role getRole() {
		return role;
	}

	/**
	 * 获取资源表.
	 * 
	 * @return 资源表
	 */
	public Resource getResource() {
		return resource;
	}

	/**
	 * 设置资源id.
	 * 
	 * @param resourceId
	 *            资源id
	 */
	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	/**
	 * 设置资源排序.
	 * 
	 * @param resourceSeq
	 *            资源排序
	 */
	public void setResourceSeq(Integer resourceSeq) {
		this.resourceSeq = resourceSeq;
	}

	/**
	 * 设置角色id.
	 * 
	 * @param roleId
	 *            角色id
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	/**
	 * 创建时间.
	 * 
	 * @param roleResourceCreateTime
	 *            创建时间
	 */
	public void setRoleResourceCreateTime(String roleResourceCreateTime) {
		this.roleResourceCreateTime = roleResourceCreateTime;
	}

	/**
	 * 设置角色表.
	 * 
	 * @param role
	 *            角色表
	 */
	public void setRole(Role role) {
		this.role = role;
	}

	/**
	 * 设置资源表.
	 * 
	 * @param resource
	 *            资源表
	 */
	public void setResource(Resource resource) {
		this.resource = resource;
	}

}
